package com.example.pagenavigationimplicit;

import com.example.pagenavigationimplicit.slice.SecondAbilitySlice;
import com.example.pagenavigationimplicit.slice.TargetAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class SecondAbility extends Ability {
    // 声明Action，需要与config.json中的Action声明字符串一致
    public static final String ACTION_TARGET = "action.intent.targetabilityslice";
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(SecondAbilitySlice.class.getName());
        // 增加Action路由
        super.addActionRoute(ACTION_TARGET, TargetAbilitySlice.class.getName());
    }
}
